﻿using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel;
using NPOI.XSSF.Streaming;
using NPOI.XSSF.UserModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Intrinsics.X86;
using System.Text;
using System.Threading.Tasks;

namespace slwhTools.ExcelHelper
{

    public interface ISExcel
    {

        /// <summary>
        /// 文件流
        /// </summary>
        public static MemoryStream ExcelSteam;

        /// <summary>
        /// 开始列
        /// </summary>
        public static int StartCellIndex = 0;

        /// <summary>
        /// 开始行
        /// </summary>
        public static int StartRowIndex = 1;

        /// <summary>
        /// 工作表
        /// </summary>
        public static int SheetIndex = 0;

        /// <summary>
        /// 标题行的初始位置
        /// </summary>
        public static int TitleRowIndex = 0;

        /// <summary>
        /// 标题列的初始位置
        /// </summary>
        public static int TitleCellIndex = 0;

        /// <summary>
        /// 流式写入行数
        /// </summary>
        public static int SXSSFRows = 100;

        /// <summary>
        /// 工作簿（默认是.xlsx）
        /// </summary>
        public static IWorkbook workbook = new XSSFWorkbook();

        /// <summary>
        /// 创建工作簿的格式
        /// </summary>
        public static WorkType type = WorkType.XLSX;

        /// <summary>
        /// 工作表
        /// </summar
        public static ISheet sheet;

        /// <summary>
        /// 初始化工作簿
        /// </summary>
        /// <returns></returns>
        public IWorkbook SExcelInit();
    }
}
